<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>reverb</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="return.html" title="return" />
    <link rel="next" href="reverb2.html" title="reverb2" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">reverb</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="return.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="reverb2.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="reverb"></a>
      <div class="titlepage"></div>
      <a id="IndexReverb" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">reverb</span>
        </h2>
        <p>reverb — 
      Reverberates an input signal with a <span class="quote">“<span class="quote">natural room</span>”</span> frequency response.
          </p>
      </div>
      <div class="refsect1">
        <a id="idp142808096"></a>
        <h2>Description</h2>
        <p>
      Reverberates an input signal with a <span class="quote">“<span class="quote">natural room</span>”</span> frequency response.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp142864448"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ares <span class="command"><strong>reverb</strong></span> asig, krvt [, iskip]</pre>
      </div>
      <div class="refsect1">
        <a id="idp142866464"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>iskip</em></span> (optional, default=0) -- initial disposition of delay-loop data space (cf. <a class="link" href="reson.html" title="reson"><em class="citetitle">reson</em></a>). The default value is 0.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp142869168"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>krvt</em></span> -- the reverberation time (defined as the time in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude).
    </p>
        <p>
      A standard <span class="emphasis"><em>reverb</em></span> unit is composed of four <a class="link" href="comb.html" title="comb"><em class="citetitle">comb</em></a> filters in parallel followed by two <a class="link" href="alpass.html" title="alpass"><em class="citetitle">alpass</em></a> units in series. Loop times are set for optimal <span class="quote">“<span class="quote">natural room response.</span>”</span> Core storage requirements for this unit are proportional only to the sampling rate, each unit requiring approximately 3K words for every 10KC. The <a class="link" href="comb.html" title="comb"><em class="citetitle">comb</em></a>, <a class="link" href="alpass.html" title="alpass"><em class="citetitle">alpass</em></a>, <a class="link" href="delay.html" title="delay"><em class="citetitle">delay</em></a>, <a class="link" href="tone.html" title="tone"><em class="citetitle">tone</em></a> and other Csound units provide the means for experimenting with alternate reverberator designs.
    </p>
        <p>
      Since output from the standard <span class="emphasis"><em>reverb</em></span> will begin to appear only after 1/20 second or so of delay, and often with less than three-fourths of the original power, it is normal to output both the source and the reverberated signal. If <span class="emphasis"><em>krvt</em></span> is inadvertently set to a non-positive number, <span class="emphasis"><em>krvt</em></span> will be reset automatically to 0.01. (New in Csound version 4.07.) Also, since the reverberated sound will persist long after the cessation of source events, it is normal to put <span class="emphasis"><em>reverb</em></span> in a separate instrument to which sound is passed via a <span class="emphasis"><em>global variable</em></span>, and to leave that instrument running throughout the performance.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp142881648"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the reverb opcode. It uses the file <a class="ulink" href="examples/reverb.csd" target="_top"><em class="citetitle">reverb.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp142883504"></a>
          <p class="title">
            <strong>Example 761. Example of the reverb opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac   <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o reverb.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100 
<span class="ohdr">ksmps</span> <span class="op">=</span> 32 
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1 
<span class="ohdr">nchnls</span> <span class="op">=</span> 2

ga1 <span class="opc">init</span> 0 

<span class="oblock">instr</span> 1 

asig <span class="opc">poscil</span> .2, <span class="opc">cpspch</span>(p4), 1 
     <span class="opc">outs</span> asig, asig 

ga1  <span class="op">+</span><span class="op">=</span> asig     <span class="comment">;add direct signal to global reverb</span>
 
<span class="oblock">endin</span>

<span class="oblock">instr</span> 99	<span class="comment">;(highest instr number executed last)</span>

arev <span class="opc">reverb</span> ga1, 1.5
     <span class="opc">outs</span> arev, arev 
  
ga1  <span class="op">=</span> 0	<span class="comment">;clear</span>
<span class="oblock">endin</span>


<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">f</span> 1 0 128 10 1	<span class="comment">;sine</span>

<span class="stamnt">i</span> 1 0 0.1 7.00	<span class="comment">;short sounds</span>
<span class="stamnt">i</span> 1 1 0.1 8.02
<span class="stamnt">i</span> 1 2 0.1 8.04
<span class="stamnt">i</span> 1 3 0.1 8.06

<span class="stamnt">i</span> 99 0 6	<span class="comment">;reverb runs for 6 seconds</span>
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idp142887824"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="alpass.html" title="alpass"><em class="citetitle">alpass</em></a>,
      <a class="link" href="comb.html" title="comb"><em class="citetitle">comb</em></a>,
      <a class="link" href="valpass.html" title="valpass"><em class="citetitle">valpass</em></a>,
      <a class="link" href="vcomb.html" title="vcomb"><em class="citetitle">vcomb</em></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idp142892816"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: William <span class="quote">“<span class="quote">Pete</span>”</span> Moss</td>
          </tr>
          <tr>
            <td>University of Texas at Austin</td>
          </tr>
          <tr>
            <td>Austin, Texas USA</td>
          </tr>
          <tr>
            <td>January 2002</td>
          </tr>
        </table>
        <p>
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="return.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="reverb2.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">return </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> reverb2</td>
        </tr>
      </table>
    </div>
  </body>
</html>
